home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
messages.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
10KB
|
161 lines
(Comp.sys.handhelds)
Item: 3008 by ftg0673 at tamsun.tamu.edu
----------
Resp: 1 of 2 by ftg0673 at tamsun.tamu.edu
Author: [Rick Grevelle]
Date: Mon May 06 1991
Several months ago Wickes posted a tongue-in-cheek library to which he later
referred as the Bart Simpson Library. Basically it contained every message
array in the 48 which of course had been altered to provide a completely new
set of messages intended to amuse. In his lecture at the Philadelphia area
user group meeting last year he alluded, as well as illustrated with another
library, that this customized message capability had been done purposefully
to allow the use of other languages. This article describes the information
necessary to override any or all of the intrinsic message arrays with in the
48. However, for those individuals who remain too intimidated to delve into
the world of internals, there are still no means provided here by which any
of the error messages can be interjected with the name of a specific program
responsible for generating the error.
Rick Grevelle
Customizing Message Arrays
=============================================================================
By default, the 48 contains thirteen libraries. Here is a summary of these:
Relevant Library Addresses
-----------------------------------------------------------------------------
Number/Address | Hash Table | Message Array | Link Table | Config Routine
-----------------------------------------------------------------------------
#0h/#028E3h | none | #72000h * | none | #0BB40h **
-----------------------------------------------------------------------------
#1h/#10F14h | none | #72704h * | none | #11086h **
-----------------------------------------------------------------------------
#2h/#189E8h | #7448Ah * | #72DCFh * | #22651h | #18A01h
-----------------------------------------------------------------------------
#3h/#29DB3h | none | #72F1Eh * | none | none
-----------------------------------------------------------------------------
#5h/#35504h | none | #736F9h * | none | none
-----------------------------------------------------------------------------
#6h/#2C086h | none | #72FE6h * | none | none
-----------------------------------------------------------------------------
#Ah/#32F5Eh | none | #72281h * | none | none
-----------------------------------------------------------------------------
#Bh/#0F05Ch | none | #726A5h * | none | none
-----------------------------------------------------------------------------
#Ch/#2D340h | none | #7232Ch * | none | #2D359h **
-----------------------------------------------------------------------------
#Dh/#0CABEh | none | #7260Ah * | none | #0CAD7h **
-----------------------------------------------------------------------------
#19h/#0BE14h | none | none | none | none
-----------------------------------------------------------------------------
#F0h/#38836h | none | none | #3834Fh | none
-----------------------------------------------------------------------------
#700h/#22DE5h | #7247Ch * | none | #22E08h | #22EA3h **
-----------------------------------------------------------------------------
* covered ROM address ** non-auto attaching
Only ten of the thirteen libraries contain message arrays, of which there is
one whose configuration routine is auto attaching. To override any of these
message arrays the library to which it belongs must first be attached. Then
the replacement message array, which can be stored in either a library as an
XLIB or a directory as a GLOBAL variable, must be attached via the use of an
unavailable user language command. The directory which has been provided at
end of this article contains all ten of the 48's message arrays, each stored
in GLOBAL variables corresponding to library's hexadecimal number. Routines
used for attaching and detaching these message arrays have been included.
Because most users will not be interested in changing all of the 48's message
arrays, it won't be necessary for those individuals to store and attach every
one of these. It is for this reason I'm providing the following illustration
which will demonstrate how to attach and override a single message array, and
then return control to the default. In order to benefit those whose capacity
to program the calculator is limited to user language, the information that's
being presented here is in a format understandable and familiar to all of us.
Others whose programming skills are already advanced will need only a look at
the two routines CUSTOM and DEFAULT after reading this material to understand
their function.
All of the object types not supported by the display routines can be found in
the message array belonging to library #1. I've always hated those Externals
appearing in the display. Greater than ninety percent of these are merely an
assortment of the prefixed machine routines of which the SYSTEM RPL is built.
Perhaps if Hewlett-Packard had foreseen the immense popularity of the 48 they
would have taken the time to do things a bit differently. Because it is most
unlikely any of the objects represented by Externals would be something other
than prefixed machine code, it might be preferable for the display routine to
to use Address instead. So for the example chosen the message array is going
to be changed such that all Externals will appear as Address.
o First, it will most always be desirable to start by altering
a copy of the default message array. This will be much less
trouble than constructing an array from scratch. It's not a
major task to recall a copy of any of the ten default arrays
to the stack, but to alter an array of strings, two routines
from the HACKIT library, OUT\->, and \->ARR will be needed.
o The message arrays for all of the ROM libraries can be found
in the 32K bank of ROM that's normally covered by RAM. It's
for this reason that it is often referred to as covered ROM.
Recalling objects from this usually inaccessible bank of ROM
requires only two steps, and of course the object's address.
o Recall a copy of the message array from a library by placing
the location of the message array in level one, #72704h, and
executing \<< #05A03h SYSEVAL #0C612h SYSEVAL \>>. An array
of string which is the message array from library #1 will be
the result. Consult the table for the addresses to the rest
of the message arrays.
o Use the OUT\-> command in the HACKIT library for decomposing
the array into its sixty-two constituent strings. It is now
possible to edit any of the individual strings, then altering
or completely replacing the string. Make sure you've put the
string back in its appropriate position on the stack after it
has been altered. Use \->ARR to recompile the message array
of strings.
o After the array has been altered, store it in a GLOBAL name,
and attach the library from which it came, if it hasn't been
done previously. Note only one out of the ten ROM libraries
is auto attaching; all others must be attached. ATTACH will
not work for ROM libraries so place the binary number of the
library, #1h, in level one, and then execute these SYSEVALs:
\<< #05A03h SYSEVAL #07709h SYSEVAL \>>.
o Next the array must be identified as the replacement for the
default array and attached too. Again, this will need to be
done using SYSEVALs, so once more place the library's binary
number in level one, and the GLOBAL in which the replacement
message array is stored in level two, and use the following:
\<< #05A03h SYSEVAL SWAP RCL #0764Eh SYSEVAL \>>
o Nullify the above procedure by detaching the library, and in
the case of library #2h, reattach. To detach put the number
of the library being detached in level one and execute this:
\<< #05A03h SYSEVAL #076AEh SYSEVAL \>>.
The following directory contains all of the 48's default message arrays with
an exception; the string "External" in library #1h was changed to "Address".
The affect of this can be viewed by installing the directory, then recalling
the contents of the CUSTOM variable to the stack, and toggling both commands
CUSTOM and DEFAULT. The display auto refreshes after each key press so that
the unsupported prefixed machine routines will change back and forth between
External and Address. Last it should be mentioned that if it's desirable to
convert the directory into a library, it would be advisable to place all the
GLOBAL names containing message arrays in a list in $HIDDEN so that they are
not visible in the library. GLOBAL names beginning with the letter "A" will
contain message arrays. Characters following each dot relate the library's
hexadecimal number to the message array contain in the variable.